
//package org.csu.onlineedubackend.config;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
//import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
//import org.springframework.security.web.SecurityFilterChain;
//
///**
// * Spring Security配置类
// */
//@Configuration
//@EnableWebSecurity
//public class SecurityConfig {
//
//    /**
//     * 安全过滤链配置
//     */
//    @Bean
//    public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
//        http
//            .csrf(csrf -> csrf.disable())
//            .authorizeHttpRequests(authorize -> authorize
//                // .requestMatchers("/login", "/login-by-phone", "/captcha", "/register", "/send-sms", "/check-username", "/check-phone").permitAll()
//                // .requestMatchers("/api/chat/**", "/api/face/register", "/api/face/login").permitAll()
//                // .anyRequest().authenticated()
//                .anyRequest().permitAll() // 临时诊断：允许所有请求
//            );
//
//        return http.build();
//    }
//}
//
